package com.ruoyi.system.mapper;

import com.ruoyi.system.domain.BsOrderInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.ro.OrderCount;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Entity com.ruoyi.system.domain.BsOrderInfo
 */
public interface BsOrderInfoMapper extends BaseMapper<BsOrderInfo> {

    BsOrderInfo getOrderInfoWithDetailsByOrderId(Long orderId);

    List<BsOrderInfo> getOrderInfoWithDetailsByJingquId(Long jingquId);

    List<BsOrderInfo> getOrderInfoWithDetailsByJingquIdAndDate(@Param("jingquId") Long jingquId, @Param("date") String date);

    List<BsOrderInfo> getOrderInfoWithDetailsByJingquIdAndDateWithOutCancle(@Param("jingquId") Long jingquId, @Param("date") String date);

    List<BsOrderInfo> selectOver30NoPayOrder();

    List<BsOrderInfo> selectOverTimeOrder();

    int getPeopleCountByDate(@Param("status") int status, @Param("date") String date, @Param("jingquId") Long jingquId);

    int getPeopleCountByMonth(@Param("status") int status,  @Param("month") String month,  @Param("jingquId") Long jingquId);

    int getPeopleCountByYear(@Param("status") int status, @Param("year")  String year, @Param("jingquId")  Long jingquId);

    int getPeopleCountBySeason(@Param("status") int status,  @Param("year")  String year ,@Param("season")  int season, @Param("jingquId")  Long jingquId);

    BigDecimal getCostByMonth(@Param("status") int status, @Param("month") String month,@Param("jingquId")  Long jingquId);

    BigDecimal getCostByYear(@Param("status") int status,@Param("year") String year,@Param("jingquId") Long jingquId);

    BigDecimal getCostBySeason(@Param("status")int status, @Param("year") String year,@Param("season")  int season, @Param("jingquId")Long jingquId);

    Integer selectMenpiaoNumWithOrder(@Param("date") Date date, @Param("menpiaoNumId") Long menpiaoNumId);

    boolean selectAlreadyOrder(@Param("userId") Long userId, @Param("orderDate") Date orderDate, @Param("jingquId")Long jingquId);

    OrderCount orderCount(@Param("userId") Long userId);
}




